
import 'dart:convert';

TeacherCreateDto teacherCreateDtoFromJson(String str) =>
    TeacherCreateDto.fromJson(json.decode(str));

String teacherCreateDtoToJson(TeacherCreateDto data) =>
    json.encode(data.toJson());

class TeacherCreateDto {
  TeacherCreateDto(
      {this.userName,
      this.email,
      this.firstName,
      this.lastName,
      this.classId,
      this.password});

  String? userName;
  String? email;
  String? firstName;
  String? lastName;
  List<String>? classId;
  String? password;

  factory TeacherCreateDto.fromJson(Map<String, dynamic> json) =>
      TeacherCreateDto(
        userName: json["userName"],
        firstName: json["firstName"],
        lastName: json["lastName"],
        classId: json["classId"] != null
            ? List<String>.from(json["classId"].map((x) => x))
            : null,
        password: json["password"],
      );

  Map<String, dynamic> toJson() => {
        "userName": userName,
        "email": email,
        "firstName": firstName,
        "lastName": lastName,
        "classId":
            classId != null ? List<dynamic>.from(classId!.map((x) => x)) : null,
        "password": password,
      };
}
